<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
  import util from '@/assets/utils/zhzf-util'

  export default {
    name: 'app',
    watch: {
      '$i18n.locale': 'i18nHandle'
    },
    created() {
      this.i18nHandle(this.$i18n.locale)
    },
    methods: {
      i18nHandle(val, oldVal) {
        util.cookies.set('lang', val)
        document.querySelector('html').setAttribute('lang', val)
      }
    }
  }
</script>

<style lang="scss">
  //公共样式
  @import '~@/assets/style/public-class.scss';
  // 注册主题
  @import '~@/assets/style/theme/register.scss';
  //扩展样式
  @import '~@/assets/style/zhzf.scss';
</style>
